package cn.doitedu.data_service.controller;

import cn.doitedu.data_service.service.AddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AddController {


    @Autowired
    AddService addService;

    @RequestMapping("/doit/add")
    public int add(int a,int b){

        int res = addService.add(a,b);

        return res;
    }



    @RequestMapping("/doit/p")
    public Person getPerson(){
        Person p = new Person("谷世羿", 33, "M", 30000);
        return p;
    }

}
